package chaozuo;

import shu.Booklist;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 18128
 * Date: 2023-09-24
 * Time: 12:47
 */
public class chazhao implements CZJK{
    public void work(Booklist booklist)
    {
//        System.out.println("查找图书");
        Scanner scan=new Scanner(System.in);
        System.out.println("输入你要查找的书名是多少");
        String s=scan.next();
        for (int i = 0; i < booklist.getNum(); i++) {
            if(s.equals(booklist.getBrr(i).getName()))
            {
                System.out.println("找到这本书了");
                System.out.println(booklist.getBrr(i));
                return ;
            }
        }
        System.out.println("没有这本书");
        return ;
    }
}
